package com.foreknow.mapping;

import com.foreknow.model.Admin;

import java.sql.ResultSet;
import java.sql.SQLException;

public class AdminMapping implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Admin admin=new Admin();
        admin.setAdminId(rs.getInt("adminId"));
        admin.setAdminName(rs.getString("userName"));
        admin.setPassword(rs.getString("password"));
        return admin;

    }
}
